<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fm" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path=request.getProtocol()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath();
%>
<html>
<head>
    <title>新增APP基础信息</title>
    <%=path%>
    <!-- Bootstrap -->
    <link href="/statics/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awe/some -->
    <link href="/statics/css/font-awesome.min.css" rel="stylesheet">
    <!-- NProgress -->
    <link href="/statics/css/nprogress.css" rel="stylesheet">
    <!-- iCheck -->
    <link href="/statics/css/green.css" rel="stylesheet">
    <!-- Datatables -->
    <link href="/statics/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="/statics/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
    <link href="/statics/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
    <link href="/statics/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
    <link href="/statics/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">

    <!-- Custom Theme Style -->
    <link href="/statics/css/custom.min.css" rel="stylesheet">

</head>
<body >
<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
        <div class="x_title">
            <h2>
                <b><small>历史版本列表</small></b>
            </h2>
            <ul class="nav navbar-right panel_toolbox">
                <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                       aria-expanded="false"><i class="fa fa-wrench"></i></a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="#">Settings 1</a>
                        </li>
                        <li><a href="#">Settings 2</a>
                        </li>
                    </ul>
                </li>
                <li><a class="close-link"><i class="fa fa-close"></i></a>
                </li>
            </ul>
            <div class="clearfix"></div>
        </div>
        <div class="x_content">
            <table id="datatable-checkbox" class="table table-striped table-bordered bulk_action">
                <thead>
                <tr>
                    <th>软件名称</th>
                    <th>版本号</th>
                    <th>版本大小(单位：M)</th>
                    <th>发布状态</th>
                    <th>APK文件下载</th>
                    <th>最新更新时间</th>
                </tr>
                </thead>
           <c:forEach items="${versionList}" var="version">
               <tbody id="showAjax">
               <tr ${ap%2==0?"bgcolor='red'":''}>
                   <td id="softwarename">${version.appInfo.softwarename}</td>
                   <td id="versionno">${version.versionno}</td>
                   <td id="versionsize">${version.versionsize}</td>
                   <td id="publishstatus">${version.publishstatus}</td>
                   <td id="apklocpath">${version.apklocpath}</td>
                   <td id="modifydate">${version.modifydate}</td>
               </tr>
               </tbody>
           </c:forEach>
            </table>
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>
                            <b><small>新增APP版本信息</small></b>
                        </h2>
                        <div class="clearfix"></div>
                    </div>
        <fm:form modelAttribute="appversion" method="post" data-parsley-validate="" class="form-horizontal form-label-left" novalidate=""  action="/appversion/addAppversion" enctype="multipart/form-data">
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="first-name">版本号*<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <fm:input path="versionno"  class="form-control col-md-7 col-xs-12" type="text" />
                    <fm:errors path="versionno"/>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-3 col-sm-3 col-xs-12" for="last-name">版本大小*<span class="required">*</span>
                </label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <fm:input path="versionsize" required="required" class="form-control col-md-7 col-xs-12" type="text" />
                    <%--<fm:errors path="versionsize"/>--%>
                </div>
            </div>

            <div class="form-group">
                <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">发布状态*</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <fm:select path="publishstatus">
                        <fm:option value="3">预发布</fm:option>
                    </fm:select>
                </div>
            </div>

            <div class="form-group">
            <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">版本简介*</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <fm:textarea path="versioninfo"/>
                </div>
            </div>
            <div class="form-group">
                <label for="middle-name" class="control-label col-md-3 col-sm-3 col-xs-12">apk文件#</label>
                <div class="col-md-6 col-sm-6 col-xs-12">
                    <input type="file" name="apkfilename"/>
                </div>
            </div>
            <div class="form-group">
                    <input type="submit" value="提交"/>

                 </div>
        </fm:form>
                    <!-- jQuery -->
                <script src="/statics/js/jquery.min.js"></script>
                <!-- Bootstrap -->
                <script src="/statics/js/bootstrap.min.js"></script>
                <!-- FastClick -->
                <script src="/statics/js/fastclick.js"></script>
                <!-- NProgress -->
                <script src="/statics/js/nprogress.js"></script>
                <!-- iCheck -->
                <script src="/statics/js/icheck.min.js"></script>
                <!-- Datatables -->
                <script src="/statics/datatables.net/js/jquery.dataTables.min.js"></script>
                <script src="/statics/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
                <script src="/statics/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
                <script src="/statics/datatables.net-buttons-bs/js/buttons.bootstrap.min.js"></script>
                <script src="/statics/datatables.net-buttons/js/buttons.flash.min.js"></script>
                <script src="/statics/datatables.net-buttons/js/buttons.html5.min.js"></script>
                <script src="/statics/datatables.net-buttons/js/buttons.print.min.js"></script>
                <script src="/statics/datatables.net-fixedheader/js/dataTables.fixedHeader.min.js"></script>
                <script src="/statics/datatables.net-keytable/js/dataTables.keyTable.min.js"></script>
                <script src="/statics/datatables.net-responsive/js/dataTables.responsive.min.js"></script>
                <script src="/statics/datatables.net-responsive-bs/js/responsive.bootstrap.js"></script>
                <script src="/statics/datatables.net-scroller/js/dataTables.scroller.min.js"></script>
                <script src="/statics/js/jszip.min.js"></script>
                <script src="/statics/js/build/pdfmake.min.js"></script>
                <script src="/statics/js/build/vfs_fonts.js"></script>

                <!-- Custom Theme Scripts -->
                <script src="/statics/js/custom.min.js"></script>

    </body>
</html>